import { ElMessage } from 'element-plus'

declare const electronAPI: any

export async function checkUserSettings() {
  try {
    const userSettings = await electronAPI.getUserSettings()
    if (!userSettings.email || !userSettings.site) {
      ElMessage.error('请先在Settings界面填写Email和Location!')
      return false
    }
    return true
  } catch (error) {
    console.error('获取用户设置失败:', error)
    ElMessage.error('系统配置加载失败')
    return false
  }
}
